CC		= arm-linux-gcc
LD 		= arm-linux-ld
OBJCOPY	= arm-linux-objcopy
OBJDUMP	= arm-linux-objdump
AR		= arm-linux-ar

NAME		:= led
MKHEADER	:=../tools/make_image/mkv210_image

$(NAME).bin: led.o 
	$(LD) -Ttext 0x0 -o $(NAME).elf $^
	$(OBJCOPY) -O binary $(NAME).elf $(NAME).bin
	$(OBJDUMP) -D $(NAME).elf > $(NAME)_elf.dis
	@echo make header information for irom booting
	$(MKHEADER) $@
	
%.o : %.S
	$(CC) -o $@ $< -c

%.o : %.c
	$(CC) -o $@ $< -c 

clean:
	rm *.o *.elf *.bin *.dis mkx210 *.sdCard -f
